<!-- @format -->

<template>
  <div class="niu-lang">
    <h3>牛郎</h3>
    <button @click="sendLove">发射爱心</button>
  </div>
</template>

<script>
  // 导入空的Vue实例
  import eventBus from '../eventBus.js'
  export default {
    data() {
      return {
        msg: '一封情书...'
      }
    },
    methods: {
      sendLove() {
        // 发消息
        eventBus.$emit('biubiubiu', this.msg)
      }
    }
  }
</script>

<style></style>
